<div class="frame clearfix">
        	<div class="top"></div>
        	<div class="body clearfix">
<?php if(false): ?>
           <div class="select-control clearfix">
               <select id="ddlist" name="ddlist">
                    <option value="1">Prikaži sve proizvode</option>
                    <option value="2">Ulje za motor</option>
                    <option value="3" selected="selected">Mazivo za ležajeve</option>
                    <option value="4">Ulje za getribu</option>
                    <option value="5">Aditiv za injektore</option>
                    <option value="6">Pasta za poliranje</option>
                    <option value="7">Filter za gorivo</option>
                </select>
			</div>
<?php endif ?>
            <div style="clear:both;">

<?php $products = $pager->getResults(); ?>
<?php $i = 1; ?>
<?php foreach($products as $product): ?>

    <dl class="product">
        <dt>
            <?php if($product->hasSpecialOffer()) : ?>
            <div class="<?php echo $product->getDiscount()->getCssStyle() ?>">
                <a
                    title="<?php echo $product->getName()?>"
                    href="<?php echo url_for('product_show', array('slug'=>$product->getSlug())) ?>"
                    ><?php echo $product->getDiscount()->getLinkText() ?></a>
            </div>
            <?php endif ?>
            <a title="<?php echo $product->getName() ?>" href="<?php echo url_for('product_show', array('slug'=>$product->getSlug())) ?>">
                <img
                    src="<?php echo getThumbnail($product->getDefaultPhoto()->get('picture'), 'product', 'standard') ?>"
                    width="175"
                    height="110"
                    alt="<?php echo $product->getName() ?>">

            </a>
        </dt>
        <dd>
          <h4><a href="<?php echo url_for('product_show', array('slug'=>$product->getSlug())) ?>"><?php echo $product->getName() ?></a></h4>
            <ul class="description">
                <li><?php echo $product->getDescription() ?></li>
                <li class="price"><?php echo $product->getPrice() ?> Kn</li>
            </ul>
            <div class="add-cart"><a title="dodaj u košaricu" href="<?php echo url_for('add_to_cart', array('slug'=>$product->getSlug())) ?>">dodaj u košaricu</a></div>
        </dd>
    </dl>
<?php if($i%4 == 0): ?>
<div class="clear"></div>
<?php endif ?>
<?php $i++; ?>
<?php endforeach ?>
                <!-- products end -->


         	</div>
<?php if ($pager->haveToPaginate()): ?>

      <ul class="pager clearfix">
         <li class="begin">
             <?php echo link_to('Početak', 'homepage') ?>
         </li>

<?php $links = $pager->getLinks(); foreach ($links as $page): ?>
            <li <?php echo ($page == $pager->getPage()) ? 'class="active"' : ''; ?>>
                <?php
                    echo link_to( $page, 'homepage', array('page'=>$page)); ?>
            </li>
<?php endforeach ?>
         <li class="end">
<?php
            echo link_to
            (
                    'Kraj', 'homepage', array('page'=>$pager->getLastPage())
            );?>

         </li>
      </ul>

<?php endif; ?>


    <div class="clear"></div>
                </div>

    <div class="bottom"></div>
</div>
